<?php 
if(!defined('ADMIN')){
	exit('Access Denied');
}


?>
<div class="pageHeader">
	<p><b>菜品发布 > 编辑产品</b></p>
</div>
<div class="pageContent" >
<form method="post" action="index.php?mod=caipu&act=addedi" class="pageForm required-validate" onsubmit="return validateCallback(this,navTabAjaxDone)">
<input type="hidden" name="sub" value="save" />
<input type="hidden" name="id" value="<?=$id?>" />
<div class="pageFormContent nowrap" layoutH="80" style="overFlow-x: hidden;">


<dl>
    <dt>选择名厨(名店)：</dt>
    <dd>
    
    <span class="info" style=""><?=select($cheflist,$row['shop_id'],'shop_id','')?>&nbsp;必选</span>
    </dd>
    </dl>
<dl>
    <dt>菜品分类：</dt>
    <dd>
    
    <span class="info" style=""><?=select($catlist,$row['pcate'],'pcate','')?>&nbsp;必选</span>
    </dd>
    </dl>


<dl>
    <dt>菜品名称：</dt>
    <dd>
    <input type="text" name="title" style="width:300px" id="title"  value="<?=$row["title"]?>" class="required" />
    <input type="checkbox" name="isindex" <? if($row["isindex"]==1){ echo "checked='true'";}?> value="1" />是否首页推荐
        <span class="info">&nbsp;</span>
    </dd>
    </dl>
  

    <dl>
    <dt>菜品价格：</dt>
    <dd>
    <input type="text" name="productprice" style="width:300px"  value="<?=$row["productprice"]?>" class="required" />
        <span class="info">&nbsp;</span>
    </dd>
    </dl>
    <dl>
    <dt>菜品成本价格：</dt>
    <dd>
    <input type="text" name="basicprice" style="width:300px"  value="<?=$row["basicprice"]?>" class="required" />
        <span class="info">&nbsp;</span>
    </dd>
    </dl>
  


    
                   
    <dl>
    <dt>是否上架：</dt>
    <dd>
<?=html_radio($yesno_arr,$row["status"],"status")?>

    <span class="info">&nbsp;</span>
    </dd>
    </dl>  
                
    <dl>
    <dt>菜品图片：</dt>
    <dd>

       <input name="imgs0.id" id="imgs0_id" type="hidden" value="">
        <input name="imgs0.fileName" class="readonly textInput" id="imgs0_fileName" style="width: 300px;" type="text" readonly="readonly" value="<?=$imagelist[0]?>">
        <a title="" class="btnPic" href="index.php?mod=content&amp;act=upload" width="460" height="200" lookupgroup="imgs0">附件</a>
        <input name="imgs0.title" class="textInput" id="imgs0_title" type="text" value="" style="display: none;">
       <span class="info">&nbsp; &nbsp;<img style="cursor: pointer;" onclick="javascript:clearimginfo('imgs0_')" src="images/cross.png"> 默认缩略图</span>
        
        <input name="imgs1.id" id="imgs1_id" type="hidden" value="">
        <input name="imgs1.fileName" class="readonly textInput" id="imgs1_fileName" style="width: 300px;" type="text" readonly="readonly" value="<?=$imagelist[1]?>">
        <a title="" class="btnPic" href="index.php?mod=content&amp;act=upload" width="460" height="200" lookupgroup="imgs1">附件</a>
        <input name="imgs1.title" class="textInput" id="imgs1_title" type="text" value="" style="display: none;">
        
        <span class="info">&nbsp; &nbsp;<img style="cursor: pointer;" onclick="javascript:clearimginfo('imgs1_')" src="images/cross.png"></span><input name="imgs2.id" id="imgs2_id" type="hidden" value="">
        <input name="imgs2.fileName" class="readonly textInput" id="imgs2_fileName" style="width: 300px;" type="text" readonly="readonly" value="<?=$imagelist[2]?>">
        <a title="" class="btnPic" href="index.php?mod=content&amp;act=upload" width="460" height="200" lookupgroup="imgs2">附件</a>
        <input name="imgs2.title" class="textInput" id="imgs2_title" type="text" value="" style="display: none;">
        
        <span class="info">&nbsp; &nbsp;<img style="cursor: pointer;" onclick="javascript:clearimginfo('imgs2_')" src="images/cross.png"></span><input name="imgs3.id" id="imgs3_id" type="hidden" value="">
        <input name="imgs3.fileName" class="readonly textInput" id="imgs3_fileName" style="width: 300px;" type="text" readonly="readonly" value="<?=$imagelist[3]?>">
        <a title="" class="btnPic" href="index.php?mod=content&amp;act=upload" width="460" height="200" lookupgroup="imgs3">附件</a>
        <input name="imgs3.title" class="textInput" id="imgs3_title" type="text" value="" style="display: none;">
        
        <span class="info">&nbsp; &nbsp;<img style="cursor: pointer;" onclick="javascript:clearimginfo('imgs3_')" src="images/cross.png"></span><input name="imgs4.id" id="imgs4_id" type="hidden" value="">
        <input name="imgs4.fileName" class="readonly textInput" id="imgs4_fileName" style="width: 300px;" type="text" readonly="readonly" value="<?=$imagelist[4]?>">
        <a title="" class="btnPic" href="index.php?mod=content&amp;act=upload" width="460" height="200" lookupgroup="imgs4">附件</a>
        <input name="imgs4.title" class="textInput" id="imgs4_title" type="text" value="" style="display: none;">
        
        <span class="info">&nbsp; &nbsp;<img style="cursor: pointer;" onclick="javascript:clearimginfo('imgs4_')" src="images/cross.png"></span><input name="imgs5.id" id="imgs5_id" type="hidden" value="">
        <input name="imgs5.fileName" class="readonly textInput" id="imgs5_fileName" style="width: 300px;" type="text" readonly="readonly" value="<?=$imagelist[5]?>">
        <a title="" class="btnPic" href="index.php?mod=content&amp;act=upload" width="460" height="200" lookupgroup="imgs5">附件</a>
        <input name="imgs5.title" class="textInput" id="imgs5_title" type="text" value="" style="display: none;">
        
        <span class="info">&nbsp; &nbsp;<img style="cursor: pointer;" onclick="javascript:clearimginfo('imgs5_')" src="images/cross.png"></span>

    </dd>
    </dl>
                   
    <dl>
    <dt>介绍：</dt>
    <dd>
    <textarea id="content" name="content" style="width: 460px;height: 100px;"><?=$row["content"]?></textarea>
    </dd>
</dl>
<dl>
<dt>排序：</dt>
<dd>
<input type="text" name="listorder" style="width:100px"  value="<?=$row["displayorder"]?>"  />
 <span class="info">&nbsp;越大越靠前</span>
</dd>
    </dl>

</div>
<div class="formBar">
<ul style="float:left;">
<li><div class="buttonActive"><div class="buttonContent"><button type="submit">发 布 菜 品</button></div></div></li>
</ul>
</div>
</form>

<script type="text/javascript">
function clearimginfo(divid){
    $("#"+divid+"title").val("");
    $("#"+divid+"id").val("");
    $("#"+divid+"fileName").val("");
    
}
</script>